<template>
	<view class="pagebox">
<!-- 		<view class="line">
			<view class="searhcbox">
				<view class="iconfont icon-sousuo">
					
				</view>
				<input type="text" placeholder="请输入名称" />
				<view class="searchbtn">
					搜索
				</view>
			</view>
			<view class="addressbox">
				<picker mode="date" :value="date" start="2025-09-10"  end="2099-12-30" @change="selectdate">
					<view class="picker">{{date||'日期'}}
					
					</view>
				</picker>
			</view>
		</view> -->
	
	
	
	<view class="listbox">
		<view class="itemlist"  v-for="item in list " :key="item.id" @click="yizhudetail(item)">
			<view class="infobox">
				<view class="imgbox">
					<image :src="'https://changban.dianjingkeji.net'+item.yzImg" @click.stop="lookimage(item.yzImg)" mode=""></image>
				</view>
				<view class="info">
					
					<view class="nameline">
						
						<view class="name">
							{{item.yzTitle}}
						</view>
					
					</view>
					<view class="hospitalname">
						<view class="label">
							点评:
						</view>
						<view class="content">
							{{item.yzContent}}
						</view>
					</view>
					<view class="hospitalname">
						<view class="label">
							时间:
						</view>
					    <view class="time">
					    	{{item.createTime}}
					    </view>
					</view>
					
				</view>
			</view>
	
		</view>
	</view>
	</view>
</template>

<script>
		 import {medicalOrders} from '../../utils/api.js'
	export default {
		data() {
			return {
				date:'',
				list:[],
			}
		},
		onLoad(e) {
			let a ={
				phone:uni.getStorageSync('phone'),
				memberId:e.id
			}
			medicalOrders(a).then(res=>{
				this.list=res.data.data.orderList
			})
		},
		methods: {
			
			lookimage(e){
				uni.previewImage({
							urls: ['https://changban.dianjingkeji.net/'+e],
							longPressActions: {
								itemList: ['发送给朋友', '保存图片', '收藏'],
								success: function(data) {
									console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
								},
								fail: function(err) {
									console.log(err.errMsg);
								}
							}
						});
			},
			yizhudetail(e){
			
				if(e.yzStatus!=4){
					uni.showToast({
						title: '医嘱生成中...',
						icon:'none',
						duration: 2000
					});
			           return
				}
				let id=e.id
				uni.navigateTo({
					url:'/pagesB/yizhudetail/yizhudetail?id='+id
				})
				
			},
			selectdate(e){
				this.date=e.detail.value
			},
		}
	}
</script>

<style lang="less">
.pagebox{
	width: 750rpx;
	box-sizing: border-box;
	padding: 30rpx;
	background: linear-gradient(180deg, rgba(242,248,255,1) 0%,rgba(255,255,255,0) 76%);
	.line{
		width: 100%;
		display: flex;
		align-items: center;
		font-weight: bold;
	}
	.searhcbox{
			  width: 80%;
			  display: flex;
			  align-items: center;
			  height: 60rpx;
			  line-height: 60rpx;
			  border-radius: 30rpx;
			  margin: auto;
			 background-color: #F8F8F8 ;
			 font-size: 30rpx;
			 .iconfont{
				 font-size: 36rpx;
			 }
			  input{
				  width: 60%;
				  height: 60rpx;
				  padding: 0 10rpx;
				  
			  }
			  .searchbtn{
				  width: 25%;
				  background-color: white;
	              text-align: center;
				 line-height: 60rpx;
				 border-radius: 30rpx;
			  }
	}
	.line{
		width: 100%;
		display: flex;
		align-items: center;
	}
	.addressbox{
		width: 200rpx;
		height: 60rpx;
		margin: 20rpx;
		background-color: #F8F8F8  ;
		border-radius: 10rpx;
		picker{
			width: 200rpx;
			height: 60rpx;
			
		}
		.picker{
			width: 200rpx;
			height: 60rpx;
			text-align: center;
			font-size: 28rpx;
			line-height: 60rpx;
			
			
		}
	}
	.listbox{
				  width: 100%;
				  
				  box-sizing: border-box;
				 
				  .itemlist{
					  width: 100%;
					  margin-bottom: 30rpx;
					  border-radius: 20rpx;
					  background-color: white;
					   padding: 20rpx;
					   box-sizing: border-box;
					  .infobox{
						  display: flex;
						  align-items: center;
						  .imgbox{
							  width: 170rpx;
							  height: 200rpx;
							  border-radius: 10rpx;
							  margin-right: 20rpx;
							  image{
								  width: 100%;
								  height: 100%;
								  border-radius: 10rpx;
							  }
						  }
						  .info{
							flex: 1;
							line-height: 2.5;
							.nameline{
								display: flex;
								align-items: center;
								position: relative;
								overflow: hidden;
								.iconfont{
									position: absolute;
									right: 10rpx;
									top: 0;
									color:#D2D2D2 ;
									display: flex;
									align-items: center;
									view{
										font-size: 24rpx;
										color: black;
									}
									
								}
								.name{
									font-weight: bold;
									margin-right: 20rpx;
								}
							}
							.hospitalname{
								font-size: 28rpx;
								display: flex;
								align-items: center;
								height: 50rpx;
								line-height: 50rpx;
								width: 100%;
								overflow: hidden;
								font-weight: bold;
								.label{
									width: 100rpx;
									min-width: 100rpx;
									text-align: left;
									
								}
								.content{
									flex:1;
									 text-overflow: ellipsis;   /* 显示省略符号 */
									 overflow: hidden;
									 text-wrap: nowrap;
									 color: #1a4f8a;
									 height: 50rpx;
									 line-height: 50rpx;
								}
							}
						
							
						  }
					  }
				
				  }
				  
	}
}
</style>
